import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/login.vue'
import forget from '../components/forget.vue'
import modify from '../components/modify.vue'
import home from '../components/home.vue'
import form from '../components/form.vue'
import permissions from '../components/permissions.vue'
import student from '../components/student.vue'
import manager from '../components/manager.vue'
import number from '../components/number.vue'
import shenpi from '../components/shenpi.vue'
import shenpi_1 from '../components/shenpi_1.vue'
import equipment from '../components/equipment.vue'
import warehouse from '../components/warehouse.vue'
import lend from '../components/lend.vue'
import back from '../components/back.vue'
import laboratory from '../components/laboratory.vue'
import information from '../components/information.vue'
import register from '../components/register.vue'
import RunningForm from '../components/view/RunningForm.vue'
import equipmentList from '../components/view/equipmentList.vue'
import KaiFang from '../components/view/KaiFang.vue'
import labBorrow from '../components/view/labBorrow.vue'

Vue.use(VueRouter)

const routes = [
    { path: '/', redirect: '/login' },
    { path: '/register', component: register },
    { path: '/login', component: login },
    { path: '/forget', component: forget },
    { path: '/modify', component: modify },
    {
        path: '/home',
        component: home,
        redirect: '/form',
        children: [
            // { path: '/permissions', component: permissions },
            { path: '/form', component: form },
            { path: '/student', component: student },
            { path: '/manager', component: manager },
            { path: '/number', component: number },
            { path: '/shenpi', component: shenpi },
            { path: '/shenpi_1', component: shenpi_1 },
            { path: '/equipment', component: equipment },
            { path: '/warehouse', component: warehouse },
            { path: '/lend', component: lend },
            { path: '/back', component: back },
            { path: '/information', component: information },
            { path: '/laboratory', component: laboratory },
        ]
    },
    { path: '/RunningForm', component: RunningForm },
    { path: '/equipmentList', component: equipmentList },
    { path: '/KaiFang', component: KaiFang },
    { path: '/labBorrow', component: labBorrow },
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router